<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head th:include="first::header">
    <!--<script type="javascript">-->
    <!--$("#register").onclick = function () {-->
    <!--alert("111");-->
    <!--var password = $("#password").val();-->
    <!--var rePassword = $("#re-password").val();-->
    <!--if (password != rePassword){-->
    <!--alert("两次密码不同，请重新输入");-->
    <!--return false;-->
    <!--}-->
    <!--$.ajax({-->
    <!--type:"POST",-->
    <!--url:"/user/register",-->
    <!--data:{-->
    <!--name:$("#name").val(),-->
    <!--username:$("#username").val(),-->
    <!--password:$("#password").val(),-->
    <!--role:$("#role option:selected").val()-->
    <!--},-->
    <!--success:function (data) {-->
    <!--alert(data);-->
    <!--}-->
    <!--});-->
    <!--return true;-->
    <!--}-->
    <!--</script>-->
</head>
<body>

<div class="container">
    <div class="row">
        <div class="col-md-12 text-center">
            <ul class="menu">
                <li class="active"><a href="indexPage.html"></a></li>
                <!-- 						<li><a href="index2.html">Style 2</a></li>
                                        <li><a href="index3.html">Style 3</a></li> -->
            </ul>
        </div>
    </div>
    <div class="row">
        <div class="col-md-4 col-md-offset-4">


            <!-- Start Sign In Form -->
            <form th:action="@{/user/register}" class="fh5co-form animate-box" data-animate-effect="fadeIn"
                  th:method="post">
                <h2>Sign Up</h2>
                <div class="form-group">
                    <label for="username" class="sr-only">UserName</label>
                    <input type="text" class="form-control" id="username" placeholder="学号" autocomplete="off"
                           name="username">
                </div>
                <div class="form-group">
                    <label for="name" class="sr-only">Name</label>
                    <input type="text" class="form-control" id="name" placeholder="姓名" autocomplete="off" name="name">
                </div>
                <div class="form-group">
                    <label for="email" class="sr-only">Email</label>
                    <input type="email" class="form-control" id="email" placeholder="邮箱" autocomplete="off"
                           name="email">
                </div>
                <div class="form-group">
                    <label for="password" class="sr-only">Password</label>
                    <input type="password" class="form-control" id="password" placeholder="密码" autocomplete="off"
                           name="password">
                </div>
                <div class="form-group">
                    <label for="re-password" class="sr-only">Re-type Password</label>
                    <input type="password" class="form-control" id="re-password" placeholder="确认密码" autocomplete="off"
                           name="rePassword">
                </div>
                <div class="form-group">
                    <label class="sr-only">Role</label>
                    <select class="form-control" name="role" autocomplete="off">
                        <option value="0">学生</option>
                        <option value="0">教师</option>
                    </select>
                </div>
                <div class="form-group">
                    <label for="remember"><input type="checkbox" id="remember"> Remember Me</label>
                </div>
                <div class="form-group">
                    <p>Already registered? <a href="login.html" th:href="@{/page/login}">&nbsp;&nbsp;&nbsp;&nbsp;Sign
                        In</a></p>
                </div>
                <div class="form-group">
                    <button type="submit" value="" class="btn btn-primary" id="register">Sign Up</button>
                </div>
            </form>
            <!-- END Sign In Form -->

        </div>
    </div>
    <div th:include="first::footer">
    </div>
</div>
</body>
</html>

